#ifndef WORKBENCH_H
#define WORKBENCH_H

#include <QMainWindow>
#include <QMap>

class QMdiArea;
class QToolBar;
namespace Jcr
{

class DataViewWindow;
class ImageViewWindow;
class WorkbenchPrivate;
class Workbench : public QMainWindow
{
    Q_OBJECT
public:
    explicit Workbench(QWidget *parent = 0);
    ~Workbench();

private:
    void init();
    void createMenus();
    void createToolBars();
    QAction* createAction(const QString& text, const char* slot = nullptr, const QIcon& icon = QIcon());

private slots:
    void onExit();
    void onCopy();
    void onCut();
    void onPaste();

    void notify(const QString& msg);

private:
    void addDock(QWidget* widget, Qt::DockWidgetArea area = Qt::RightDockWidgetArea);

private:
    Q_DISABLE_COPY(Workbench)
    WorkbenchPrivate* d_ptr;
    QMdiArea* m_mdiArea = nullptr;
    QToolBar* m_fileBar = nullptr;
    QMap<QString, QAction*> m_actionMap;
};

} // namespace jcr
#endif // WORKBENCH_H
